package com.googlecode.monitoring.db.model;

/**
 * Author: Sergiy Doroshenko
 * Date: May 14, 2010
 * Time: 5:10:56 PM
 */
public enum EventTimeType {
	BETWEEN("between"),
	ONE_TIME("one_time");

	private String name;

	EventTimeType(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public static EventTimeType buildFromString(String value) {
		if (value.equalsIgnoreCase(EventTimeType.ONE_TIME.getName())) {
			return EventTimeType.ONE_TIME;
		}
		return EventTimeType.BETWEEN;
	}

}
